import request from "@/utils/request";
import {HOST} from "@/constants";
import qs from "qs";


export function pubEnterpriseProduct(data) {
    return request({
        url: `${HOST}/enterprise/product/add`,
        method: 'post',
        data: qs.stringify(data)
    })
}

export function passEnterpriseProduct(data) {
    return request({
        url: `${HOST}/enterprise/product/pass`,
        method: 'post',
        data: qs.stringify(data)
    })
}

export function makeEnterpriseProductOrder(data) {
    return request({
        url: `${HOST}/enterprise-product/order/make`,
        method: 'post',
        data: qs.stringify(data)
    })
}

export function filterEnterpriseProduct(data) {
    return request({
        url: `${HOST}/enterprise/product/filter`,
        method: 'get',
        params: data
    })
}

export function getMyEnterpriseProduct(data) {
    return request({
        url: `${HOST}/enterprise/product/my`,
        method: 'get',
        params: data
    })
}

export function getUnpassEnterpriseProduct(data) {
    return request({
        url: `${HOST}/enterprise/product/unpass`,
        method: 'get',
        params: data
    })
}

export function getEnterpriseProductList(data) {
    return request({
        url: `${HOST}/enterprise/product/list`,
        method: 'get',
        params: data
    })
}

export function getOneEnterpriseProduct(data) {
    return request({
        url: `${HOST}/enterprise/product/one`,
        method: 'get',
        params: data
    })
}
